import moment from 'moment'

export const timeFilter = (timestamp) => {
  return moment(timestamp * 1000).format('YYYY-MM-DD HH:mm')
}

export const moneyFilter = (money) => {
  return money / 100
}

export const normalStatusFilter = (status) => {
  return ['显示', '隐藏'][status]
}

export const taskLevelFilter = ({ hard_level }) => {
  if (hard_level === 1) {
    return '初级'
  }
  if (hard_level === 2) {
    return '中级'
  }
  return '高级'
}
